home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / Mail / glob.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-02-08  |  3.5 KB  |  86 lines

  1. /*
  2.  * Copyright (c) 1980 Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms are permitted
  6.  * provided that the above copyright notice and this paragraph are
  7.  * duplicated in all such forms and that any documentation,
  8.  * advertising materials, and other materials related to such
  9.  * distribution and use acknowledge that the software was developed
  10.  * by the University of California, Berkeley.  The name of the
  11.  * University may not be used to endorse or promote products derived
  12.  * from this software without specific prior written permission.
  13.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  14.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  15.  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  16.  *
  17.  *    @(#)glob.h    5.18 (Berkeley) 10/20/88
  18.  */
  19.  
  20. /*
  21.  * A bunch of global variable declarations lie herein.
  22.  * def.h must be included first.
  23.  */
  24.  
  25. int    msgCount;            /* Count of messages read in */
  26. int    rcvmode;            /* True if receiving mail */
  27. int    sawcom;                /* Set after first command */
  28. char    *Tflag;                /* -T temp file for netnews */
  29. int    senderr;            /* An error while checking */
  30. int    edit;                /* Indicates editing a file */
  31. int    readonly;            /* Will be unable to rewrite file */
  32. int    noreset;            /* String resets suspended */
  33. int    sourcing;            /* Currently reading variant file */
  34. int    loading;            /* Loading user definitions */
  35. int    cond;                /* Current state of conditional exc. */
  36. FILE    *itf;                /* Input temp file buffer */
  37. FILE    *otf;                /* Output temp file buffer */
  38. FILE    *pipef;                /* Pipe file we have opened */
  39. int    image;                /* File descriptor for image of msg */
  40. FILE    *input;                /* Current command input file */
  41. char    mailname[PATHSIZE];        /* Name of current file */
  42. char    prevfile[PATHSIZE];        /* Name of previous file */
  43. char    *homedir;            /* Path name of home directory */
  44. char    *myname;            /* My login name */
  45. off_t    mailsize;            /* Size of system mailbox */
  46. int    lexnumber;            /* Number of TNUMBER from scan() */
  47. char    lexstring[STRINGLEN];        /* String from TSTRING, scan() */
  48. int    regretp;            /* Pointer to TOS of regret tokens */
  49. int    regretstack[REGDEP];        /* Stack of regretted tokens */
  50. char    *string_stack[REGDEP];        /* Stack of regretted strings */
  51. int    numberstack[REGDEP];        /* Stack of regretted numbers */
  52. struct    message    *dot;            /* Pointer to current message */
  53. struct    message    *message;        /* The actual message structure */
  54. struct    var    *variables[HSHSIZE];    /* Pointer to active var list */
  55. struct    grouphead    *groups[HSHSIZE];/* Pointer to active groups */
  56. struct    ignoretab    ignore[2];    /* ignored and retained fields
  57.                        0 is ignore, 1 is retain */
  58. struct    ignoretab    saveignore[2];    /* ignored and retained fields
  59.                        on save to folder */
  60. struct    ignoretab    ignoreall[2];    /* special, ignore all headers */
  61. char    **altnames;            /* List of alternate names for user */
  62. int    debug;                /* Debug flag set */
  63. int    screenwidth;            /* Screen width, or best guess */
  64. int    screenheight;            /* Screen height, or best guess,
  65.                        for "header" command */
  66. int    realscreenheight;        /* the real screen height */
  67.  
  68. #include <setjmp.h>
  69.  
  70. jmp_buf    srbuf;
  71.  
  72.  
  73. /*
  74.  * The pointers for the string allocation routines,
  75.  * there are NSPACE independent areas.
  76.  * The first holds STRINGSIZE bytes, the next
  77.  * twice as much, and so on.
  78.  */
  79.  
  80. #define    NSPACE    25            /* Total number of string spaces */
  81. struct strings {
  82.     char    *s_topFree;        /* Beginning of this area */
  83.     char    *s_nextFree;        /* Next alloctable place here */
  84.     unsigned s_nleft;        /* Number of bytes left here */
  85. } stringdope[NSPACE];
  86.